package com.ynny;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
public class ProviderController {
    @Value("${server.port}")
    private String serverPort;
    @GetMapping("/provider/hello")
    public String hello(@RequestParam (value = "username",required = false)String username){
//        try{
//            Thread.sleep(5000); //线程等待时间
//        }catch(InterruptedException e ){
//            e.printStackTrace();
//        }
        return "hello I :"+username;
    }
}
//202303230107陈婷